package com.sunday.boot3.user.center.repository.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sunday.boot3.user.center.repository.entity.Permissions;
import com.sunday.boot3.user.center.repository.entity.UserRole;

import java.util.List;

/**
 * @Description: 用户角色关系表 Mapper 接口
 * @author: zsy
 * @Create: 2024/09/20 14:34:16
 */
public interface UserRoleMapper extends BaseMapper<UserRole> {

    /**
     * 通过用户ID获取所有权限
     *
     * @param userId
     * @return {@link List< Permissions>}
     */
    List<Permissions> findPermissionsByUserId(Long userId);

}
